import bunyan from 'bunyan';

// 创建一个 Bunyan 日志实例
export const logger = bunyan.createLogger({
    name: 'my-app',
    streams: [
        {
            level: 'info',
            stream: process.stdout,
        },
        {
            level: 'error',
            path: 'error.log', // 日志文件路径
        },
    ],
});

logger.info('This is an info message.');
logger.error('This is an error message.');
export default {
    logger
}
